﻿#pragma once

#include <learn/ais/ais_object.h>
#include <learn/geom/geom_basis.h>
#include <learn/geom/geom_bezier_curve.h>
#include <learn/geom/geom_nonbasis.h>

namespace xi
{

namespace ais
{

class EXT_SYMBOL AIS_Builder
{
  public:
    /**
     * @brief 构造带有 xyz 坐标轴的点对象
     *
     * @param[in] point
     * @return std::shared_ptr<AIS_Object>
     */
    static std::shared_ptr<AIS_Object> create_point(const Vec3 &point);

    /**
     * @brief 构造带有指定坐标轴的点对象
     *
     * @param[in] point
     * @param[in] axis
     * @return std::shared_ptr<AIS_Object>
     */
    static std::shared_ptr<AIS_Object> create_point(const Vec3 &point, const std::vector<Vec3> &axis);

    /**
     * @brief 构造定向向量
     *
     * @param[in] vec
     * @return std::shared_ptr<AIS_Object>
     */
    static std::shared_ptr<AIS_Object> create_vector(const Vec3 &start, const Vec3 &end);

    /**
     * @brief 构造曲线对象
     *
     * @param[in] curve
     * @return std::shared_ptr<AIS_Object>
     */
    static std::shared_ptr<AIS_Object> create_curve(std::shared_ptr<Geom_NonbasisCurve<3>> curve);

    /**
     * @brief 构造带有控制点的曲线对象
     *
     * @param[in] curve
     * @return std::shared_ptr<AIS_Object>
     */
    static std::shared_ptr<AIS_Object> create_curve(std::shared_ptr<Geom_BasisCurve<3>> curve);

    /**
     * @brief 构造二次有理 Bezier 曲线对象
     *
     * @param[in] curve
     * @return std::shared_ptr<AIS_Object>
     */
    static std::shared_ptr<AIS_Object> create_curve(std::shared_ptr<Geom_QR_BezierCurve<3>> curve);

    /**
     * @brief 构造曲面对象
     *
     * @param[in] surface
     * @return std::shared_ptr<AIS_Object>
     */
    static std::shared_ptr<AIS_Object> create_surface(std::shared_ptr<Geom_NonbasisSurface<3>> surface);

    /**
     * @brief 构造带有控制点的曲面对象
     *
     * @param[in] surface
     * @return std::shared_ptr<AIS_Object>
     */
    static std::shared_ptr<AIS_Object> create_surface(std::shared_ptr<Geom_BasisSurface<3>> surface);
};

} // namespace ais

} // namespace xi
